package com.tpu.osu.rating.client;


import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.tpu.osu.rating.Vote;
import com.tpu.osu.rating.service.VoteService;

public class RatingClient {

	public static void main(String[] aArgs) throws Exception {
		
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"com/tpu/osu/rating/client/rating.client.xml"});
		 
		
		VoteService service = (VoteService) ctx.getBean("voteService");
	
	    Vote vote = new Vote();
	    vote.setComments("YO!");
	   // vote.setGeneral(10);
	   
	    //vote.setProfessional(5);
	    vote.setPin("xxx");
	    vote.setLector("MOKINA");
	    
	   for(int i=0; i<100; i++)
	    	service.create(vote);
	    
	    System.out.println("vote 100 OK");

	}
	
}
